<!DOCTYPE html PUBLIC 
    "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
<html 
	xmlns="http://www.w3.org/1999/xhtml" 
	xmlns:ui="http://java.sun.com/jsf/facelets" 
	xmlns:h="http://java.sun.com/jsf/html" 
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:t="http://myfaces.apache.org/tomahawk"> 

	<ui:component>

		<h:panelGroup id="topicsPanel" rendered="#{brokerBean.topicView}">
		
		<table class="results" id="MQ_topics">
			<thead>
				<tr>
					<th colspan="4"><h:outputText value="#{msgs['mq.content.topics.title']}" /></th>
				</tr>	
				<h:panelGroup rendered="#{brokerBean.started}">
				<tr>
					<td width="200px"><h:outputText value="#{msgs['mq.content.topics.brokerName']}" /></td>
					<td><h:outputText value="#{msgs['mq.content.topics.destination']}" /></td>
					<td><h:outputText value="#{msgs['mq.content.queues.msgs']}" /></td>
					<td><h:outputText value="#{msgs['mq.content.topics.action']}" /></td>
				</tr>
				</h:panelGroup>
				<h:panelGroup rendered="#{!brokerBean.started}">					
					<td colspan="4">
						<h:outputText value="#{msgs['general.notavailable']}" />
					</td>
				</h:panelGroup>
			</thead>
			<h:panelGroup rendered="#{brokerBean.started}">
			<tbody class="results">
				<h:form id="topicListform">
				<ui:repeat var="t" value="#{brokerBean.topicList}">
					<tr class="cells">
						<td width="200px"><h:outputText value="#{t.brokerName}"/></td>
						<td><h:outputText value="#{t.destination}"/></td>
						<td><h:outputText value="#{t.msgs}"/></td>  
						<td>
							<h:commandLink value="#{msgs['mq.menu.action.delete']}" action="#{brokerDeleteDestinationActionHandler.deleteTopic}">
								<f:setPropertyActionListener target="#{brokerDeleteDestinationActionHandler.topic}" value="#{t}" />
							</h:commandLink>
						</td>
					</tr>
				</ui:repeat>
				</h:form>
			</tbody>
			</h:panelGroup>
		</table>				
		<br/>
		
		</h:panelGroup>
		
	</ui:component>

</html>